#include"ThreadPool.hpp"
#include "Task.hpp"
#include "Log.hpp"
#include <memory>
#include<unistd.h>

using namespace ThreadPoolModule;

int main()
{
    ENABLE_FILE_LOG();
    std::unique_ptr<ThreadPool<task_t>> tp = std::make_unique<ThreadPool<task_t>>();
    tp->Start();

    int cont = 20;
    while(cont--)
    {
        tp->Equeue(Push);
        sleep(1);
    }

    tp->Stop();
    sleep(3);
    tp->Wait();

    return 0;
}